<template>
    <view class="content">
        <movable-area class="ball-wrap">
            <movable-view :x="x" :y="y" direction="all">
				<button session-from="sessionFrom" @tap="jump(path)">
					<image src="/static/add.png" mode="widthFix"></image>
				</button>
            </movable-view>
        </movable-area>
    </view>
</template>

<script>
    export default {
		props: {
			path:{
				type: String,
				default: ''
			},
		},
        data() {
            return {
                list: [''],
                x:"",
                y:"",
            }
        },
        created(){
            uni.getSystemInfo({
                success: (res) => {
                    this.x = res.windowWidth-70;     //可视区域的宽度res.windowWidth
                    this.y = res.windowHeight/2+160; //可视区域的高度res.windowHeight
                }
            });
        },
        onLoad() {
            this.reqList();
        },
        methods: {
			jump(url){
				uni.navigateTo({
					url:url
				})
			},
            reqList() {
                uni.request({
                    url: "请求地址",
                    header: {
                        "content-type": "application/x-www-form-urlencoded",
                    },
                    data: {
                        union_online_id: 6
                    },
                    success: (res) => {
                        this.list = res.data.data;
                    }
                })
            }
        }
    }
</script>
<style lang="scss">
	
    .ball-wrap{
        //为拖拽球设置区域
        width: 100vw;
        height:100vh;
		position: fixed;
		top: 0px;
		right: -750rpx;
		z-index: 1;
        movable-view{
            position: fixed;
            width: 104.3rpx;
            height: 104.3rpx;
            font-size: 28rpx;
            button{
				   width: 104.3rpx;
				   height: 104.3rpx;
					display: inline-flex;
					flex-direction: column;
					justify-content: center;
					align-items: center;
					text-align: center;
					border-radius: 50%;
					background:none;
					font-family: PingFangSC, PingFang SC;
					font-weight: 500;
					font-size: 18rpx;
					color: rgba(255,255,255,0.77);
					margin:0;
					padding:0;
					margin-bottom:20rpx;
					image{
						width: 100%;
						height: 100%;
					}
					span{
						line-height: 36rpx;
					}
            }
            button::after{
              border:none;
             }
        }
    }
	.movable-view>button:last-child{
		border-bottom: none !important;
	}
    
</style>